/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.crm.controller;

import java.util.ArrayList;
import java.util.List;
import queenb.net.entitybean.K950V;
import queenb.web.controller.QueenbController;
import queenb.web.crm.store.K950Store;
import queenb.web.util.SessionProvider;
import queenb.web.util.Util;

/**
 *
 * @author Nguyen Hung
 */
public class K950Controller  extends QueenbController{

    private List<K950V> list = new ArrayList<K950V>();
    private int FK100;
    private int PK950;
    private String pagereload;

    public K950Controller(){
//            Object pnFK100 = getRequest().getParameter("pk100");
//            Object page = getRequest().getParameter("page");
//        if (pnFK100 != null) {
//            FK100 = Integer.parseInt(pnFK100.toString());
//            pagereload = page.toString();
//
//        }
    }

    /**
     * @return the list
     */
    public List<K950V> getList() {
        K950Store store = new K950Store();
         if(SessionProvider.getSessionMapValue("PN100HD")!=null){
                FK100 = Util.parseInt(SessionProvider.getSessionMapValue("PN100HD"));
            }
        list = store.getListTabK950(FK100, PK950,getLogin().getUserName());
        if(list.size() >0){
          System.out.println("---------BBBBBBB----------- : " +list.size());  
        }
        return list;
    }

    /**
     * @param list the list to set
     */
    public void setList(List<K950V> list) {
        this.list = list;
    }

    /**
     * @return the FK100
     */
    public int getFK100() {
        if(SessionProvider.getSessionMapValue("PN100HD")!=null){
                FK100 = Util.parseInt(SessionProvider.getSessionMapValue("PN100HD"));
            }
        return FK100;
    }

    /**
     * @param FK100 the FK100 to set
     */
    public void setFK100(int FK100) {
        this.FK100 = FK100;
    }

    /**
     * @return the PK950
     */
    public int getPK950() {
        return PK950;
    }

    /**
     * @param PK950 the PK950 to set
     */
    public void setPK950(int PK950) {
        this.PK950 = PK950;
    }

    /**
     * @return the pagereload
     */
    public String getPagereload() {
        return pagereload;
    }

    /**
     * @param pagereload the pagereload to set
     */
    public void setPagereload(String pagereload) {
        this.pagereload = pagereload;
    }


 
}
